package com.atguigu.tingshu.album.config;

import com.qcloud.vod.VodUploadClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName: VodConfiguration
 * Package: com.atguigu.tingshu.album.config
 * Description:云点播的配置类
 */
@Configuration
public class VodConfiguration {
    @Autowired
    private VodConstantProperties vodConstantProperties;

    /**
     * 实例化云点播客户端
     * @return
     */
    @Bean
    public VodUploadClient vodUploadClient(){
        return new VodUploadClient(vodConstantProperties.getSecretId(), vodConstantProperties.getSecretKey());
    }
}
